import logging


def use_logging(func):
    def warpper(*args, **kwargs):
        logging.warn("%s is running" % func.__name__)
        return func(*args)

    return warpper


@use_logging
def foo():
    print("i am foo")


@use_logging
def bar():
    print("i am bar")

foo()
bar()
